Skip to content

[ENH] Changes left stampi so fit_is_empty#3591

Open
TonyBagnall wants to merge 1 commit into
mainfrom
ajb/left_stampi
Open

[ENH] Changes left stampi so fit_is_empty#3591
TonyBagnall wants to merge 1 commit into
mainfrom
ajb/left_stampi

Conversation

@TonyBagnall

Copy link
Copy Markdown
Contributor

Fixes #2819

Fixes LeftSTAMPi so it behaves as an unsupervised series anomaly detector with empty fit. Im not sure this is the best way, but this is a genuine bug, so this solution stops unexpected behaviour for this wrapper.

predict(X) and fit_predict(X) now treat X as the complete stream being scored: STUMPi is initialized from the first n_init_train points, then updated over the remaining points. This avoids carrying state from a previous fit call into later predictions, returns scores with the correct length for the prediction series, and lets the standard series anomaly detector output check run again.

LeftSTAMPi exclusion from check_series_anomaly_detector_output was removed.

The behavioral change means fit(train).predict(test) no longer appends test onto the fitted training stream;
predict(test) scores test independently. Again, not sure this is best, we may need to add an update method to allow genuine streaming?

@TonyBagnall TonyBagnall added bug Something isn't working anomaly detection Anomaly detection package labels Jun 30, 2026
@aeon-actions-bot aeon-actions-bot Bot added the enhancement New feature, improvement request or other non-bug code enhancement label Jun 30, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ enhancement ].
I would have added the following labels to this PR based on the changes made: [ anomaly detection, testing ], however some package labels are already present.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

anomaly detection Anomaly detection package bug Something isn't working enhancement New feature, improvement request or other non-bug code enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] LeftSTAMPi output has incorrect shape

1 participant